﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Configuration;

namespace Totoro.Configuration
{
    public class TotoroConfiguration : System.Configuration.ConfigurationSection
    {
        private TotoroConfiguration() { }

        public static TotoroConfiguration GetConfig()
        {
            return (TotoroConfiguration)ConfigurationManager.GetSection("totoro");
        }

        [ConfigurationProperty("TicketExpire")]
        public TicketExpiredTimeConfigurationElement TickExpireTime
        {
            get
            {
                return (TicketExpiredTimeConfigurationElement)this["TicketExpire"];
            }
        }

    }
    public class TicketExpiredTimeConfigurationElement : System.Configuration.ConfigurationElement
    {
        /// <summary>
        /// 时间（秒）
        /// </summary>
        [ConfigurationProperty("Time", IsRequired = true)]
        public string Value
        {
            get
            {
                return (string)this["Time"];
            }
        }
    }

}
